package cn.jg.framework.auth.model;

import cn.jg.framework.common.model.SimpleBaseMultiTenantModel;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
public class Menu extends SimpleBaseMultiTenantModel {

	private static final long serialVersionUID = 1L;

	private Menu parent;

	private Integer parentId;

	private String parentIds;

	private String name;

	private Integer orders;

	private Integer type;

	private String permission;

	/**
	 * 是否显示
	 */
	private Integer isDisplay;

	public enum Type {
		ROOT(1), MENU(2), BUTTON(3);

		private int value;

		Type(int value) {
			this.value = value;
		}

		public int getValue() {
			return value;
		}
	}

}